def measure():
    """
    测量温度和湿度
    返回多个数据时用元祖
    :return:
    """
    print("测量开始")
    temp = 39
    wetness = 50
    print("测量结束")
    # 元祖可以返回多个数据
    # 函数返回元祖时，小括号可以省略
    return temp, wetness


print(measure())

print(measure()[0])
print(measure()[1])

# 使用多个变量接收返回值
gl_temp, gl_wetness = measure()
print(gl_temp)
print(gl_wetness)
